precision mediump float;

uniform samplerCube u_s_texture;
uniform vec3 u_camera_pos;

varying vec3 v_norm_world;
varying vec3 v_pos_world;

void main()
{
	//reflect from the sky
	vec3 toEye = normalize(u_camera_pos - v_pos_world);
	vec3 reflect = reflect(toEye, normalize(v_norm_world));
	vec4 Cobj = textureCube(u_s_texture, reflect);
	
	gl_FragColor = Cobj;
}